package com.yangyang.androidconnect.phoneinfo.service;

import com.yangyang.androidconnect.MyApplication;
import com.yangyang.androidconnect.phoneinfo.DataCollectionService;
import com.yangyang.androidconnect.phoneinfo.DatabaseHelper;
import com.yangyang.androidconnect.phoneinfo.model.CallRecord;

import java.util.List;

public class CallLogService {

    private DataCollectionService dataService;
    private DatabaseHelper databaseHelper;

    public CallLogService() {
        initComponents();
    }

    private void initComponents() {
        dataService = MyApplication.getInstance().getDataCollectionService();
        databaseHelper = MyApplication.getInstance().getDatabaseHelper();
    }

    public List<CallRecord> getAllCallLog() {
        List<CallRecord> callLogs = dataService.getCallLogs();
        return callLogs;
    }
}
